home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v9n04.arc
/
PASSCOMM.FNC
< prev
next >
Wrap
Text File
|
1990-01-30
|
605b
|
22 lines
pass command function
CALL PassCommand("CHKDSK" + CHR$(13)) 'the 13 simulates pressing Enter
END
SUB PassCommand (Cmd$) STATIC
Work$ = LEFT$(Cmd$, 15) 'restrict the string to 15 characters
Length = LEN(Work$) 'now get the actual length
DEF SEG = 0 'set the segment for poking to low memory
POKE 1050, 30 'define the buffer head
POKE 1052, 30 + Length * 2 'and then the buffer tail
FOR X = 1 TO Length 'poke each character one by one
POKE 1052 + X * 2, ASC(MID$(Work$, X))
NEXT
END SUB